home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / INTERNET / HTML Grinder 3.21.sit / HTML Grinder / Grinder Tools / StretchList™ / background_3858.xml next >
Extensible Markup Language  |  1997-07-01  |  9KB  |  44 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>3858</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_3127.css" />
  10.     <part>
  11.         <id>6</id>
  12.         <type>button</type>
  13.         <visible> <true /> </visible>
  14.         <reserved5> 0 </reserved5>
  15.         <reserved4> 0 </reserved4>
  16.         <reserved3> 0 </reserved3>
  17.         <reserved2> 0 </reserved2>
  18.         <reserved1> 0 </reserved1>
  19.         <enabled> <true /> </enabled>
  20.         <rect>
  21.             <left>0</left>
  22.             <top>295</top>
  23.             <right>19</right>
  24.             <bottom>312</bottom>
  25.         </rect>
  26.         <style>opaque</style>
  27.         <showName> <false /> </showName>
  28.         <highlight> <false /> </highlight>
  29.         <autoHighlight> <true /> </autoHighlight>
  30.         <sharedHighlight> <true /> </sharedHighlight>
  31.         <family>0</family>
  32.         <titleWidth>0</titleWidth>
  33.         <icon>29540</icon>
  34.         <textAlign>center</textAlign>
  35.         <font>Chicago</font>
  36.         <textSize>12</textSize>
  37.         <textStyle>plain</textStyle>
  38.         <name>Help</name>
  39.         <script>on mouseUpfullhelpend mouseUpon mouseenterhelper "Click here for more help with HTML Grinder."end mouseenter</script>
  40.     </part>
  41.     <name></name>
  42.     <script>on processglobal allfilesif the number of lines in allfiles > 1 thenbeepanswer "The StretchList邃「 Wheel only works on a single source file at a time." &&ツャ"Please drag only one document onto the Grinder icon when using the StretchList Wheel. See the manual for assistance." with "Cancel"else if cd fld condensedpath is empty or cd fld expandedpath is empty thenbeepanswer "Please select files for both the collapsed and expanded icons." with "Cancel"else pass processend processon converter thefile,thecontentsset cursor to watchget backupfile(thefile,thecontents)put the hilite of cd btn "link icons" into linkiconsget smartfind(cd fld startheader,thecontents)put it && "of thecontents" into headerstartget smartfind(cd fld endheader,thecontents)put it && "of thecontents" into headerendif word 2 of headerstart is not a number OR word 2 of headerend is not a numberthenput empty into theheaderelseput char (word 2 of headerstart) to (word 4 of headerend) of thecontents into theHeaderdelete char (word 2 of headerstart) to (word 4 of headerend) of thecontentsend if--get smartfind(cd fld startfooter,thecontents)put it && "of thecontents" into footerstartget smartfind(cd fld endfooter,thecontents)put it && "of thecontents" into footerendif word 2 of footerstart is not a number OR word 2 of footerend is not a numberthenput empty into theheaderelseput char (word 2 of footerstart) to (word 4 of footerend) of thecontents into thefooterdelete char (word 2 of footerstart) to (word 4 of footerend) of thecontentsend if--put cd fld tagger into startElementput startElement into EndElementput "/" after char 1 of EndElementrepeat with x = 1 to 1000if there is a window "Grinding..." then-- set thermometer_value of window "Grinding..." to xif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "Grinding..." to "grinder"&iconnumend if--get the element titleput smartfind(startElement,thecontents) into elementstartif elementstart is "Not Found" then exit repeatput smartfind(endElement,thecontents) into elementEndif elementEnd is "Not Found" then exit repeatput char (word 4 of ElementStart +1) to (word 2 of ElementEnd -1) of thecontents into theTitleget "put thetitle into title"&xdo it--get the element textput smartfind(startelement,thecontents,word 4 of elementEnd) into NextElement--find the start of the next element--(starting search from end of last element)--so we can get the element textif nextElement is "not found" or word 2 of nextelement < word 2 of elementEndthenput char (word 4 of ElementEnd +1) to 3000000 of thecontents into theTextget "put theText into text"&xdo itexit repeatelseput char (word 4 of ElementEnd +1) to (word 2 of NextElement -1) of thecontents into theTextdelete char (word 2 of ElementStart) to (word 2 of NextElement -1) of thecontentsget "put theText into text"&xdo itend ifend repeatput x into numElements----now we have the parts--lets create the stretch list--put folder(thefile) into thefolderput filename(thefile) into listhomeset the itemdelimiter to "."delete item 2 of listhomeset the itemdelimiter to ","----make the various pagesset thermometer_max of window "Grinding..." to numelementsrepeat with x=1 to numElementsif there is a window "Grinding..." thenset thermometer_value of window "Grinding..." to xif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "Grinding..." to "grinder"&iconnumend ifput thefolder & listhome & x & ".html" into fromFileget "put title"&x && "into TitleText"do it--now make the links for the pagerepeat with y = 1 to numelementsif there is a window "Grinding..." then-- set thermometer_value of window "Grinding..." to xif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "Grinding..." to "grinder"&iconnumend ifget "put title"&y && "into linkText"do itif y = x thenput thefile into toFileput image(line 2 of cd fld expandedpath,fromfile,,cd fld eheight,cd fld ewidth,"v") into theImageif linkIcons is true thenput theImage & " " before linktextput empty into unlinkedImageelse put theImage  & " " into unlinkedImageput  unlinkedImage & "<b>" & link(linkText,tofile,fromFile) & "</b><p>" &return after theStuffget "put text" & y && "into elementText"do itput "<blockquote>"&elementText& "</blockquote>" &return after thestuffelseput thefolder & listhome & y & ".html" into toFileput image(line 2 of cd fld condensedpath,fromfile,center,cd fld cheight,cd fld cwidth,"&gt;") into theImageif linkIcons is true thenput theImage & " " before linktextput empty into unlinkedImageelse put theImage  & " " into unlinkedImageput unlinkedImage & link(linkText,tofile,fromfile) & "<p>" &return after theStuffend ifend repeat--now write the fileopen file fromfilewrite title(titleText) &return& theheader &return& "<p>" &return& thestuff &return& thefooter to file fromFileclose file FromFileput empty into theStuffend repeat--make the listhome pageput empty into theStuffrepeat with x = 1 to numElementsif there is a window "Grinding..." then-- set thermometer_value of window "Grinding..." to xif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "Grinding..." to "grinder"&iconnumend ifput thefolder & listhome & x & ".html" into toFileget "put title"&x && "into linkText"do itput image(line 2 of cd fld condensedpath,thefile,center,cd fld cheight,cd fld cwidth,"&gt;") into theimageif linkIcons is true thenput theImage & " " before linktextput empty into unlinkedImageelse put theImage  & " " into unlinkedImageput unlinkedImage & link(linkText,tofile,thefile) & "<p>" &return after theStuffend repeatopen file thefilewrite title(listhome) &return& theheader &return& "<p>" &return& thestuff &return& thefooter to file thefileclose file thefileend converterfunction title inputreturn "<title>"&input&"</title>"&returnend titlefunction link linkText,toFile,fromFileif fromFile is not emptythen put relativepath(fromFile,toFile) into toFilereturn "<a href=" &quote& tofile &quote& ">" & linkText & "</a>"end linkfunction image imageFile,HTMLFile,alignment,theheight,thewidth,thealtif theheight is a numberthen put " height=" & theheight into heightTagelse put empty into heightTagif thewidth is a numberthen put " width=" & thewidth into widthTagelse put empty into widthTagif thealt is not emptythen put " alt=" & thealt into altTagelse put empty into altTagif alignment is not empty then put " align=" before alignmentif HTMLFile is not emptythen put relativepath(HTMLFile,imagefile) into imagefilereturn "<img" &alignment& heightTag& widthTag & altTag && "border=0 src=" &quote& imagefile &quote& ">"end imageon resetwheelput empty into cd fld condensedpathput empty into cd fld expandedpathset the hilite of cd btn "link icons" to truesend mouseup to cd btn "standard icon sizes"put "<!--Header-->" into cd fld startheaderput "<!--End of Header-->" into cd fld endheaderput "<!--Footer-->" into cd fld startfooterput "<!--End of Footer-->" into cd fld endfooterput "<h3>" into cd fld taggerpass resetwheelend resetwheel</script>
  43. </background>
  44.